﻿#ifndef CBeltCorrectMain_H
#define CBeltCorrectMain_H
/********************************************************************************
** @ Date:2025/04/30
** @ Author: HanJiaXin
** @ Description:跑偏主界面
** @ Version:1.0.0
** @ ClassName:CBeltCorrectMain
** @ Fun:
********************************************************************************/
#include <QWidget>
#include <QStandardItemModel>
#include "ui_CBeltCorrectMain.h"
#include "CCorrectPointState.h"
#include "CDevBeltRealign.h"

class CBeltCorrectMain : public QWidget
{
	Q_OBJECT

public:
	CBeltCorrectMain(CDevBeltRealign* pDev);
	~CBeltCorrectMain();

protected:
	void closeEvent(QCloseEvent *event)override;
	void showEvent(QShowEvent *event) override;
	void changeEvent(QEvent *event) override;

private:
	void setStyleSheetFile();		                        //设置界面样式表
	void initConnect();                                     //初始化槽函数连接

	void initUi();							                //初始化界面
	void loadCorrectState();					            //加载跑偏状态
	bool startPlayVideo();				                    //开始播放视频
	bool endPlayVideo();				                    //停止播放视频

public slots:
	void refreshData(bool bRefresh);						// 这个函数会被外部调用

private slots:
	void slotPushButtonVodeoPlay();								 //点击播放按钮
	void slotPushButtonLarge();									 //点击放大按钮
	void slotPushButtonSnap();									 //点击抓拍按钮
	void slotPushButtonCorrectResult();							 //点击跑偏记录查询
	void slotPushButtonCorrectPlc();							 //点击纠偏高级功能
	void slotPushButtonPointConfig();							 //跑偏点配置
	
private:
	Ui::CBeltCorrectMainClass ui;
	bool m_bIsPlaying;					//当前是否在播放视频
	CCorrectPointState* m_pCorrectPointState;
	CDevBeltRealign* m_pDev;
	QString m_sLogGuid;					//当前界面日志控件Guid
};

#endif